home *** CD-ROM | disk | FTP | other *** search
/ Ahoy 1985 June / Ahoy_Magazine_85-06_1985_Double_L.d64 / mapping 4.4 (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  6KB  |  153 lines

  1. 1 rem *********************************
  2. 2 rem *         mapping 4.4           *
  3. 3 rem *             by                *
  4. 4 rem *         j.m.marcano           *
  5. 5 rem *********************************
  6. 6 rem             8/29/84
  7. 10 rem ****** central section ******
  8. 15 poke53280,8:poke53281,0:d$="? ? ?"
  9. 20 printchr$(147):fori=1to11:print:next:printchr$(158)spc(17)"wait"
  10. 25 for ad=828to888:readva:pokead,va:nextad
  11. 30 fori=49152to49543:readc:pokei,c:next
  12. 40 sys49309:sys49385:poke81,197:sys49512:gosub160:sys49152:gosub100:gosub350
  13. 50 rem ** all the functions come here **
  14. 55 deffnf(x)=sin(x)
  15. 60 gosub210
  16. 70 onkgoto260,790,490,280,810,830,850,60
  17. 100 rem *** directory for f's keys ****
  18. 110 printchr$(19)chr$(30):fori=1to20:print:next
  19. 115 print" f1:graphic cleaner       f2:store(m+)"
  20. 120 print" f3:range changer         f4:recall"
  21. 130 print" f5:function changer      f6:clear mry"
  22. 140 print" f7:compare with mry      f8:no defined"chr$(19)chr$(154)
  23. 150 return
  24. 160 rem **transfer the char. to screen**
  25. 170 c=55341:j=1069:l=106
  26. 180 fori=0to14:pokej+i,l:pokec+i,1:l=l+1:next
  27. 190 c=c+40:j=j+40:ifj<1464then180
  28. 200 return
  29. 205 rem *** set up error trapping in 870***
  30. 206 t$="goto"+str$(870)+chr$(0)
  31. 207 for ad=1 to len(t$):poke891+ad,asc(mid$(t$,ad,1)):nextad
  32. 208 sys875
  33. 209 return
  34. 210 rem ****** input subroutine ******
  35. 215 gosub205
  36. 220 getk$:ifk$=""then220
  37. 230 ifk$=chr$(133)ork$=chr$(134)ork$=chr$(135)ork$=chr$(136)then240
  38. 231 ifk$=chr$(137)ork$=chr$(138)ork$=chr$(139)ork$=chr$(140)then240
  39. 235 goto220
  40. 240 k=asc(k$)-132
  41. 250 return
  42. 260 rem **clear char.** (f1 routine)
  43. 270 sys49385:goto60
  44. 280 rem **clear operation** (f7 routine)
  45. 285 onngoto290,295
  46. 290 poke81,202:sys49512:poke81,202:sys49416:poke81,197:sys49464:n=2:goto60
  47. 295 sys49385:poke81,202:sys49464:n=1:goto60
  48. 300 rem *** clear data area ***
  49. 310 forj=1064to1424step40
  50. 320 fori=j+23toj+39:pokei,32:nexti:nextj:return
  51. 330 rem *** clear work area ***
  52. 340 fori=1544to1743:pokei,32:next:return
  53. 350 rem *** set up data area ***
  54. 360 printchr$(19)chr$(159):print:printtab(23)"x0=";x0
  55. 370 printtab(23)"xm=";xm
  56. 380 printtab(23)"y0=";y0
  57. 390 printtab(23)"ym=";ym
  58. 400 print:printtab(23)"pixels:";dx
  59. 410 print:printtab(23)"data from "chr$(154);d$
  60. 420 return
  61. 430 rem *** set up the function area ***
  62. 440 fori=0to39:poke1784+i,32:next
  63. 450 printchr$(19)chr$(159):fori=1to18:print:next:print" y=";a$
  64. 460 return
  65. 470 rem **** position on work area ****
  66. 480 printchr$(19):fori=1to13:print:next:return
  67. 490 rem **input function **(f5 routine)
  68. 495 gosub330:gosub470
  69. 500 printchr$(159)"enter the 2dn member of the f'n on x "
  70. 505 inputa$:iflen(a$)<29then510
  71. 506 print"must has less than 29 characters":fori=0to1000:next:goto495
  72. 510 gosub330:gosub430:printchr$(19)chr$(144):fori=1to14:print:next:print;
  73. 520 print"55d[197]fnf(x)=";a$
  74. 530 print"run50
  75. 550 [151]631,13:[151]632,13:[151]633,13:[151]198,3:[128]
  76. 560 [143] ***input range subroutine***
  77. 570 [153][199](154):[141]330:[141]470:[133]"x0,xm";x0,xm
  78. 580 [139]x0[179]xm[167]600
  79. 590 [153]"must be x0<xm":[129]i[178]0[164]1000:[130]:[137]570
  80. 600 [141]330:[141]470:[133]"y0,ym";y0,ym
  81. 610 [139]y0[179]ym[167]630
  82. 620 [153]"must be y0<ym":[129]i[178]0[164]1000:[130]:[137]600
  83. 630 [141]330:[141]470:[133]"amount of pixels for the graphic";dx
  84. 635 [139]dx[177]0[167][141]330:[142]
  85. 640 [153]"must be >0":[129]i[178]0[164]1000:[130]:[137]630
  86. 650 [143] **** function evaluater ****
  87. 660 [139][180](x0)[178][180](xm)[167]670
  88. 665 x[178][171]x0[172]119[173](xm[171]x0):[129]y[178]0[164]79[169]5:[141]750:[130]
  89. 670 [139][180](y0)[178][180](ym)[167]700
  90. 675 y[178]y0[172]79[173](ym[171]y0)[170]79:[129]x[178]0[164]119[169]5:[141]750:[130]
  91. 700 sx[178](xm[171]x0)[173]dx
  92. 710 [129]i[178]x0[164]xm[169]sx
  93. 720 f[178][165]f(i):[139]f[179]y0[176]f[177]ym[167]740
  94. 730 x[178](i[171]x0)[173](xm[171]x0)[172]119:y[178](y0[171]f)[173](ym[171]y0)[172]79[170]79:[141]750
  95. 740 [130]:[142]
  96. 750 [143] ****** graphic maker ******
  97. 760 ro[178][181](y[173]8):ch[178][181](x[173]8):li[178]y[175]7
  98. 770 bit[178]7[171](x[175]7):byt[178]13136[170]ro[172]120[170]ch[172]8[170]li:[151]byt,[194](byt)[176](2[174]bit)
  99. 780 [142]
  100. 790 [143] **input range routine**(f3-routine)
  101. 800 d$[178]"user":[141]560:[141]300:[141]650:[141]350:[137]60
  102. 810 [143] **** store (f2-routine) ****
  103. 815 [151]81,197
  104. 820 [158]49416:x1[178]x0:x2[178]xm:y1[178]y0:y2[178]ym:dm[178]dx:[151]55296,5:[151]1024,13:[137]60
  105. 830 [143] **** recall **** (f4-routine)
  106. 840 [151]81,197:[158]49464:[139]x1[178]x2[167][137]60
  107. 842 d$[178]"memory":[141]300:x0[178]x1:xm[178]x2:y0[178]y1:ym[178]y2:dx[178]dm:[141]350:[137]60
  108. 850 [143] **memory cleaner** (f6-routine)
  109. 860 [151]81,197:[158]49512:[151]55296,0:[137]60
  110. 870 [143] *** error trapping ***
  111. 880 [141]470
  112. 885 en[178][194](889):[139]en[177]127[167][153][199](19):[129]i[178]1[164]11:[153]:[130]:[128]
  113. 900 [139]en[178]11[167][153]"check the function. use <f5>"
  114. 910 [139]en[178]20[167][153]"division by zero.    change range"
  115. 920 [139]en[178]25[167][153]"the function is too complex. redefine it"
  116. 930 [139]en[178]15[167][153]"number too small or too high.redifine it"
  117. 940 [139]en[178]5[167][153]"device not present. repeat operation"
  118. 950 [137]50
  119. 5000 [143] ** machine language routines **
  120. 5010 [143] 49152-set up the format
  121. 5020 [143] 49309-move characters ram_rom
  122. 5030 [143] 49385-clear these characters
  123. 5040 [143] 49416-store routine
  124. 5050 [143] 49464-recall routine
  125. 5060 [143] 49512-clear routine
  126. 5070 [143] 00875-set up trapping
  127. 5950 [131]169,139,141,0,3,169,227,141,1,3,165,58,141,123
  128. 5960 [131]3,201,255,240,39,165,57,141,122,3,142,121,3,160
  129. 5970 [131]0,185,124,3,153,0,2,240,3,200,208,245,162,255
  130. 5980 [131]160,1,76,134,164,169,60,141,0,3,169,3,141,1
  131. 5990 [131]3,96,108,0,3
  132. 6000 [131]169,61,162,40,157,223,5,157,207,6,202,208,247,169,4,162,40,157,223,217
  133. 6010 [131]157,207,218,157,31,219,202,208,244,169,45,162,40,157,31,7,202,208,250
  134. 6020 [131]169,72,162,0,157,44,4,157,84,4,157,124,4,157,164,4,157,204,4,157,244
  135. 6030 [131]4,157,28,5,157,68,5,157,108,5,157,148,5,208,5,162,16,169,71,76,43,192
  136. 6040 [131]169,13,162,0,157,44,216,157,84,216,157,124,216,157,164,216,157,204,216
  137. 6050 [131]157,244,216,157,28,217,157,68,217,157,108,217,157,148,217,208,5,162,16
  138. 6060 [131]76,86,192,169,69,162,15,157,188,5,202,208,250,169,82,162,15,157,4,4
  139. 6070 [131]202,208,250,169,13,162,15,157,188,217,157,4,216,202,208,247,96,173,14
  140. 6080 [131]220,41,254,141,14,220,165,1,41,251,133,1,169,0,133,80,133,78,169,208
  141. 6090 [131]133,81,169,48,133,79,162,8,160,0,177,80,145,78,136,192,0,208,247,202
  142. 6100 [131]240,7,230,81,230,79,76,189,192,165,1,9,4,133,1,173,14,220,9,1,141,14
  143. 6110 [131]220,173,24,208,41,240,9,12,141,24,208,96
  144. 6120 [131]169,80,133,80,169,0,160,0,162,51,134,81,145,80,136,208,251,232,224,55
  145. 6130 [131]208,244,153,80,55,200,192,177,208,248,96
  146. 6140 [131]169,80,133,78,169,51,133,79,169,0,133,80,234,234,234,234,162,5,160,0
  147. 6150 [131]177,78,17,80,145,80,200,208,247,230,81,230,79,202,208,240,177,78,17
  148. 6160 [131]80,145,80,200,192,177,208,245,96,169,80,133,78,169,51,133,79,169,0
  149. 6170 [131]133,80,234,234,234,234,162,5,160,0,177,80,17,78,145,78,200,208,247
  150. 6180 [131]230,81,230,79,202,208,240,177,80,17,78,145,78,200,192,177,208,245,96
  151. 6190 [131]169,0,133,80,234,234,234,234,162,5,160,0,169,0,145,80,200,208,251
  152. 6200 [131]230,81,202,208,246,145,80,200,192,177,208,249,96
  153.